package day13_Io.demo02_FileOutPutStream;


import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class Demo10copy {
    static int sum=0;
    public static void main(String[] args) {
        File file = new File("E:\\csw\\Demo\\src");
    }
    public static void show(File file) throws IOException {
        File[] files = file.listFiles();
        for (File file1 : files) {
            if (file1.isFile()){
                if (file1.getName().endsWith(".java")){
                    FileInputStream fis = new FileInputStream(file1.getAbsolutePath());
                    int i;
                    while ((i=fis.read())!=-1){
                        if ((char) i=='\n'){
                            sum++;
                        }
                    }
                    fis.close();
                }
            }
        }
    }
}
